<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <style type="text/css">
            .col-95 {
                text-align: right;
            }

            .col-5 {
                text-align: left;
            }

            .col-80 {
            }

            .col-20 {
                width: 5%;
            }
        </style>
        <script type="text/javascript" language="javascript">
            document.onkeydown = function TabReplace() {
                if (event.keyCode == 13) {
                    if (event.srcElement.tagName != 'BUTTON')
                        event.keyCode = 9;
                }
            }
        </script>

    </ui:define>

    <ui:define name="content">
        <div style="margin:5px;">
            <p:growl id="msgs" showDetail="false"/>
            <h:form>
                <p:panel header="数据交换监控子系统">
                    <p:fieldset legend="消息持久化数据库信息" toggleable="true" toggleSpeed="500">
                        <h:panelGrid columns="3" cellpadding="10">
                            <p:graphicImage value="/images/dep/oracle.png"/>
                            <h:panelGroup style="font-size: 13px;text-align: left">
                                <h:outputText value="数据库："/><br/>
                                <h:outputText value="用户："/><br/>
                                <h:outputText value="密码："/><br/>
                                <h:outputText value="ActiveMQ持久消息表："/><br/>
                            </h:panelGroup>
                            <h:panelGroup style="font-size: 13px;text-align: left">
                                <h:outputText value="#{msgPstStatusAction.dbIP}"/><br/>
                                <h:outputText value="#{msgPstStatusAction.dbUser}"/><br/>
                                <h:outputText value="#{msgPstStatusAction.dbPassword}"/><br/>
                                <h:outputText value="activemq_msgs"/><br/>
                            </h:panelGroup>
                        </h:panelGrid>
                    </p:fieldset>
                    <br/>
                    <p:fieldset legend="持久化数据库表信息" toggleable="true" toggleSpeed="500">
                        <br/>
                        <p:dataTable id="pdt" style="width:100%;"
                                     dynamic="true" selectionMode="single"
                                     value="#{msgPstStatusAction.pstMsgList}" var="record"
                                     paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                     paginator="true" rows="10" paginatorPosition="bottom"
                                     rowsPerPageTemplate="100,50,30,10,5"
                                     emptyMessage="数据记录为空...">

                            <p:column headerText="队列" style="text-align:center">
                                <h:outputText value="#{record.container}"/>
                            </p:column>
                            <p:column headerText="消息ID" style="text-align:left">
                                <h:outputText value="#{record.msgidProd}"/>
                            </p:column>
                            <p:column headerText="优先级" style="text-align:center">
                                <h:outputText value="#{record.priority}"/>
                            </p:column>

                        </p:dataTable>

                    </p:fieldset>
                </p:panel>
            </h:form>
        </div>
    </ui:define>

</ui:composition>